package com.heima.crm.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.heima.crm.common.result.PageResult;
import com.heima.crm.common.result.Result;
import com.heima.crm.pojos.dtos.*;
import com.heima.crm.pojos.entity.TbBusiness;
import com.heima.crm.pojos.vos.BusinessPageVo;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author author
 * @since 2023-07-15
 */
public interface TbBusinessService extends IService<TbBusiness> {

    /**
     * 线索分页查询
     * @return
     */
    Result<PageResult<BusinessPageVo>> findAllBusiness( BusinessPageDto dto);

    Result addBusiness(BusinessAddDto dto);

    /**
     * 回显用户所有跟进记录
     * @param customerId
     * @return
     */
    Result findCustomerCondition(Long customerId);

    /**
     * 分配商机
     * @param
     * @return
     */
    Result assignBusiness(BusinessAssignDto dto);

    /**
     * 商机详情数据回显
     * @param businessId
     * @return
     */
    Result findBusinessDetail(Long businessId);

    /**
     * 跟进记录
     * @param dto
     * @return
     */
    Result followBusiness(BusinessFollowDto dto);

    /**
     * 退回公海
     * @param dto
     * @return
     */
    Result returnBusiness(BusinessReturnDto dto);

    /**
     * 批量拉取
     * @param businessIds
     * @return
     */
    Result scoopBatch(Long[] businessIds);
}
